1. Field of the Invention
This invention relates to a computer interface for a stencil printer and a method of rewriting a program for the interface.
2. Description of the Related Art
When inputting data into a stencil printer in which a stencil making system is integrated with a printing system for mass-printing (such a stencil printer will be referred to as xe2x80x9ca stencil printer with stencil making systemxe2x80x9d or sometimes referred to simply as xe2x80x9ca stencil printerxe2x80x9d, hereinbelow), a data take-up method in which a stand-alone data take-up device integrated with a stencil printer such as an image scanner is employed has been conventionally mainly employed. Accordingly, conventionally even printing data made by a computer must be once printed out and the printing data must be taken in the stencil printer by reading the print-out by the image scanner or the like. Since almost all the printing data is recently made by a computer and since the data take-up method using a stand-alone data take-up device is not high in efficiency, a computer interface for a stencil printer which processes printing data from the computer to convert it into stencil making data and outputs the stencil making data directly to the stencil printer with stencil making system has been developed.
The computer interface generally comprise a data receiving section which receives data from a computer, a data processing section which converts the data from the computer into stencil making data, and a video data output section which outputs the stencil making data to a stencil printer with stencil making system. The data processing section comprises a control program storage section which stores a control program and a RAM which stores various pieces of data and a running program.
The xe2x80x9crunning programxe2x80x9d is a printing data processing program for converting the printing data into stencil making data and is not preserved together with other pieces of data when power is turned off.
The control program includes various initialization programs which control the computer interface, a program having a copying function for copying programs to a RAM or a judging function to judge whether jump to the RAM is to be caused, a main program on the basis of which the running program in the RAM is made, and the like, and is stored in the control program storage section.
When the printing data sent from the data receiving section is to be converted into a stencil making data, the data processing section copies in the RAM a main program for data processing out of main programs stored in the control program storage section, and converts the printing data into a stencil making data, and sends the stencil making data to the video data output section.
The control program storage section comprises a nonvolatile memory (a ROM or a flash memory) and the control programs stored in the control program storage section are preserved even when power is turned off.
Though the control programs are input into the control program storage section when the computer interface is shipped from the factory, version-up frequently becomes necessary after shipment for the purpose of eliminating the bugs, enhancing functions or changing the specifications.
When the control program storage section comprises a ROM, in order to make version-up of the control programs, power of the computer interface and devices related to the computer interface must be turned off and the ROM must be replaced by a ROM into which a new control program has been input or the control program stored in the ROM must be rewritten.
To the contrast, when the control program storage section comprises a flash memory, version-up of the control programs can be made without changing the hardware. However, the flash memory must be shifted to a program rewriting mode by a special operation. Though varying depending upon the maker, the flash memory is generally shifted to the program rewriting mode by turning on power of the computer interface while depressing one or more switches on the computer interface or by shifting the computer interface to an engineer development mode, which is not known by those other than the developers of the maker, and carrying out command processing. Since a slight mistake in this operation can result in a failure of the computer interface, this operation is not generally executed by the end user but executed by a maker side, e.g, a serviceperson of the maker or a maintenance engineer.
The control program storage section of a flash memory is advantageous over that of a ROM in that version-up of the control programs can be made without changing the hardware.
However in the case of control program storage section of a flash memory, there is a problem that a special operation is required to rewrite the control programs and a skilled operator is required to rewrite the control programs since the special operation can result in a failure of the computer interface.
Further, when an error occurs during rewriting of the control programs or during erasure of the blocks, or when accidental destruction of the control programs occurs, for instance, by accidental power turning off during rewriting of the control programs, the flash memory must be forced into the program rewriting mode. Further depending upon the severity of destruction of the control programs, even rewriting of the control programs sometimes becomes unfeasible.
Since version-up of the control programs is not executed only for debug, preserving both the old and new control programs so that one of the old and new control programs may be used depending on the environment has been required. The environment as used here means the whole printing system including the computer and the stencil printer. For example, the control programs for the computer interface corresponding to Windows 98 (Microsoft) are also applicable to Windows 95 (Microsoft). However since the control programs corresponding to Windows 95 less loads the CPU of the computer interface, the control programs of Windows 95-corresponding version are preferable to those of Windows 98-corresponding version. When computers of different operating systems use the same computer interface and the same stencil printer through a network such as a LAN (local area network) or a WAN (wide area network) or through remote access using, for instance, a modem, it is preferred in view of efficiency that a plurality of control programs coexist in a computer interface for a stencil printer and one of control programs is selected depending on the operating system of the computer which drives the stencil printer.
In view of the foregoing observations and description, the primary object of the present invention is to provide a computer interface for a stencil printer the control programs for which can be rewrote without a special operation and in which a plurality of control programs for different versions are selectively used.
Another object of the present invention is to provide an improved method of rewriting the control programs in such a computer interface.
In accordance with a first aspect of the present invention, there is provided a computer interface comprising a data receiving means which receives printing data and/or program rewriting data from a computer, a data processing means which converts the printing data from the computer into stencil making data according to a running program, and a video data output means which outputs the stencil making data to a stencil printer with stencil making system, wherein the improvement comprises that
the data processing means is provided with a nonvolatile memory consisting of a main program block which is rewritable and stores a main program and a start-up program block which is not rewritable and stores a start-up program, and
a main program rewriting means rewrites a main program in the main program block when the main program which has been stored in the main program block is invalid or when the data receiving means receives program rewriting data from the computer.
The xe2x80x9cnonvolatile memoryxe2x80x9d means, for instance, a ROM or a flash memory which can hold the contents of memory even when it is disconnected from a power source.
Since the main program block should be rewritable, the main program block is formed of a rewritable memory such as a flash memory. The start-up program block may be formed of either a flash memory or a ROM which is not rewritable.
It is preferred that the computer interface of the present invention be further provided with a main program rewrite requirement, judging means which sets main program identification information in the main program block and judges whether the main program is invalid and determines whether the main program is to be rewrote on the basis of the main program identification information while the data processing means is executing the start-up program after a power source of the computer interface is turned on.
When none of the main programs stored in the main program block is valid, it is determined that the main programs are invalid, and when at least one of the programs stored in the main program block is valid, it is determined that the main programs are valid.
The main program identification information means information which is to be set after the valid main programs are rewrote and on the basis of which the rewrote main programs are distinguishable. It is preferred that the main program identification information be on the version of the new main program though it may be information indicating that rewriting of the main programs is successfully ended or the time at which rewriteing of the main program is normally ended.
Since the main program identification information is deleted before the preceding main program is erased and set after the preceding main program is replaced by a new main program, the main program block which bears the main program identification information is turned to 0xc3x97FF in the case of failure in rewriting the main program, and the start-up program reads the main program identification information and judges whether preceding rewriting of the main program is successfully ended or the present main program is valid.
Further, it is preferred that the computer interface of the present invention be further provided with a switching means which switches the computer interface to a state where the main program is rewritable when the data receiving means receives the program rewriting data from the computer even if the main programs have been fully destructed, none of them are valid or a main program is being executed.
It is preferred that a plurality main programs of different versions be stored in the main program block and the start-up program be provided with a main program selecting means which selectively executes a main program of a selected version.
For example, by keeping a main program of a certain version left in the main program block after the main program block is loaded with a main program of another version, a plurality of main programs of different versions can be stored in the main program block.
In accordance with a second aspect of the present invention, there is provided a method of rewriting a program for a computer interface which receives printing data from a computer and outputs stencil making data to a stencil printer with stencil making system, wherein the improvement comprises the steps of
storing a main program of a control program in a main program block of a nonvolatile memory which is rewritable,
storing a start-up program of the control program in a start-up program block of the nonvolatile memory which is not rewritable, and
rewriting the main program when the main program which has been stored in the main program block is invalid or when program rewriting data is input from the computer.
It is preferred that the method of the present invention further comprises the steps of
setting main program identification information in the main program block and
judging whether the main program is invalid on the basis of the main program identification information while the start-up program is being executed.
It is preferred that the method of the present invention further comprises the step of switching the computer interface to a state where the main program is rewritable when the data receiving means receives the program rewriting data from the computer even if the main programs have been fully destructed, none of them are valid or a main program is being executed.
It is preferred that a plurality of main programs of different versions be stored in the main program block and the start-up program selectively executes one of the main programs of a selected version.
As can be understood from the description above, the main program can be easily rewrote without necessity of special operation.
Further, when the computer interface of the present invention is further provided with a switching means which switches the computer interface to a state where the main program is rewritable when the data receiving means receives program rewriting data even if the main programs have been fully destructed, none of them are valid or a main program is being executed, the main program can be rewrote by only sending program rewriting data from a computer through not only known an IEEE1284 but also a network such as a LAN or a WAN or through remote access using, for instance, a modem.
Further, it is possible to arrange the computer interface so that a plurality of main programs of different versions are stored in the main program block and one of the main programs of a selected version are executed.